<div class="admin-container">
  <div class="sidebar">
    <div class="logo">
      <h2>管理系统</h2>
    </div>
    <nav class="nav-menu">
      <a class="nav-item" [class.active]="isActive('/admin')" (click)="navigateTo('/admin')">
        <i class="fas fa-home"></i>
        <span>首页</span>
      </a>
      <a class="nav-item" [class.active]="isActive('/admin/users')" (click)="navigateTo('/admin/users')">
        <i class="fas fa-user"></i>
        <span>用户管理</span>
      </a>
      <a class="nav-item" [class.active]="isActive('/admin/settings')" (click)="navigateTo('/admin/settings')">
        <i class="fas fa-cog"></i>
        <span>系统设置</span>
      </a>
      <a class="nav-item" [class.active]="isActive('/admin/statistics')" (click)="navigateTo('/admin/statistics')">
        <i class="fas fa-chart-bar"></i>
        <span>数据统计</span>
      </a>
      <a class="nav-item" (click)="logout()">
        <i class="fas fa-sign-out-alt"></i>
        <span>退出登录</span>
      </a>
    </nav>
  </div>
  <div class="main-content">
    <header class="header">
      <div class="user-info">
        <i class="fas fa-user-circle"></i>
        <span>欢迎，{{ username }}</span>
      </div>
    </header>
    <main class="content">
      <router-outlet></router-outlet>
    </main>
  </div>
</div>